﻿#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace TheSpirit
{
    public abstract class Card
    {
        #region Declaration

        protected Texture2D cardTexture;
        protected Tower tower;
        protected bool isInstalled;
        protected Rectangle position;
        protected String name;

        #endregion


        #region Propterty

        public String Name
        {
            get { return name; }
        }
        public Texture2D CardTexture
        {
            get { return cardTexture; }
        }
        public Tower Tower
        {
            set { tower = value; }
            get { return tower; }
        }
        public bool IsInstalled
        {
            set { isInstalled = value; }
            get { return isInstalled; }
        }
        public Rectangle Position
        {
            get { return position; }
        }

        #endregion


        #region Abstract Method

        public abstract void LoadContent(ContentManager content);
        public abstract void Update(GameTime gameTime, List<Enemy> enemy, int worldX, int worldY);
        public abstract Card Upgrade();

        #endregion


        #region Method
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(cardTexture, position, Color.White);
        }

        public void setPosition(int x, int y, int width, int height)
        {
            position.X = x;
            position.Y = y;
            position.Width = width;
            position.Height = height;
        }

        #endregion
    }
}